package cn.tannn.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * sql枚举
 *
 * @author tn
 * @version 1
 * @date 2022-01-04 14:54
 */
@AllArgsConstructor
@Getter
public enum SqlEnums {

    /**
     * 表注释1
     */
    TABLE_COMMENT_1("comment =","格式一"),

    /**
     * 表注释2
     */
    TABLE_COMMENT_2("comment=","格式二"),

    ;


    /**
     * 获取标注上的判断符号
     * @param tableSql tableSql
     * @return tableComment
     */
    public static String getTableComment(String tableSql){
        for (SqlEnums code : SqlEnums.values()) {
           if(tableSql.contains(code.getCode())){
               return code.getCode();
           }
        }
        return "";
    }


    private final String code;
    private final String message;
}
